package com.aspose.cells;

class zaxz extends zawf {
   private int a;
   private int b;
   private int c;
   private int d;
   private int e;
   private int f;
   private int g;
   private zur h;
   private int i;
   private int j;
   private int k;

   public zaxz(zaye var1) {
      this.h = var1.a();
      if (this.h != null) {
         this.e = this.h.b & '\uffff';
         this.f = this.h.c & '\uffff';
         if (this.f > this.e) {
            this.h = new zur(this.h.a, this.e, this.e);
         }
      } else {
         this.e = -1;
         this.f = -1;
      }

      this.a = var1.b();
      this.b = var1.f();
      this.c = var1.d();
      this.d = var1.h();
      this.g = this.b - this.a + 1;
      this.f();
   }

   zaxz(zaxz var1) {
      this.a = var1.a;
      this.b = var1.b;
      this.c = var1.c;
      this.d = var1.d;
      this.e = var1.e;
      this.f = var1.f;
      this.g = var1.g;
      this.h = var1.h;
      this.i = var1.i;
      this.j = var1.j;
      this.k = var1.k;
   }

   public zahn b(zaay var1) {
      return new zaxz(this);
   }

   public int c() {
      return this.g * (this.f - this.e + 1);
   }

   public int d() {
      return this.d - this.c + 1;
   }

   public boolean l() {
      return this.a == this.b && this.c == this.d && this.f == this.e;
   }

   public boolean m() {
      return this.g < 2 && this.f == this.e;
   }

   public boolean n() {
      return this.c == this.d;
   }

   public zagu a(int var1, int var2) {
      if (this.g == 1 && this.f == this.e) {
         var1 = 0;
      }

      if (this.c == this.d) {
         var2 = 0;
      }

      zur var3 = this.h;
      if (this.e < this.f) {
         int var4;
         if (var1 < this.g) {
            var4 = this.e;
         } else {
            var4 = this.e + var1 / this.g;
            var1 %= this.g;
         }

         new zur(this.h.a, var4, var4);
      }

      return new zaal(64, new zaye(this.h, this.a + var1, this.c + var2, this.a + var1, this.c + var2));
   }

   public int b() {
      return 9;
   }

   public void f() {
      this.i = this.e;
      this.j = this.a;
      this.k = this.c - 1;
      if (this.e < this.f) {
         this.h.b = this.h.c = this.e;
      }

   }

   public boolean b(int var1, int var2) {
      this.i = this.e + var1 / this.g;
      this.j = this.a + var1 % this.g;
      this.k = this.c + var2;
      if (this.k > this.d) {
         ++this.j;
         if (this.j > this.b) {
            ++this.i;
            if (this.i > this.f) {
               return false;
            }

            this.j = this.a;
         }

         this.k = this.c;
      }

      return true;
   }

   public boolean a(int var1) {
      int var2 = this.d();
      int var3 = var1 % var2;
      int var4 = var1 / var2;
      return this.b(var4, var3);
   }

   public boolean g() {
      if (this.i <= this.f) {
         if (this.j <= this.b) {
            if (this.k < this.d) {
               ++this.k;
               return true;
            }

            ++this.j;
            if (this.j <= this.b) {
               this.k = this.c;
               return true;
            }
         }

         ++this.i;
         if (this.i <= this.f) {
            if (this.e < this.f) {
               this.h.b = this.h.c = this.i;
            }

            this.j = this.a;
            this.k = this.c;
            return true;
         }
      }

      return false;
   }

   public zagu h() {
      return new zaal(64, new zaye(this.h, this.j, this.k, this.j, this.k));
   }

   public int i() {
      return this.j - this.a + this.g * (this.i - this.e);
   }

   public int j() {
      return this.k - this.c;
   }

   public int k() {
      return (this.j - this.a + this.g * (this.i - this.e)) * (this.d - this.c + 1) + this.k - this.c;
   }

   public zahn b(int var1) {
      if (this.a == this.b) {
         return this;
      } else {
         zur var2;
         int var3;
         if (this.e < this.f) {
            var3 = this.e + var1 / this.g;
            var2 = new zur(this.h.a, var3, var3);
            var1 %= this.g;
         } else {
            var2 = this.h;
         }

         var3 = this.a + var1;
         return new zaxz(new zaye(var2, var3, this.c, var3, this.d));
      }
   }

   public zahn c(int var1) {
      if (this.c == this.d) {
         return this;
      } else {
         zur var2;
         if (this.e < this.f) {
            var2 = new zur(this.h.a, this.e, this.f);
         } else {
            var2 = this.h;
         }

         int var3 = this.c + var1;
         return new zaxz(new zaye(var2, this.a, var3, this.b, var3));
      }
   }

   public boolean q() {
      return true;
   }

   public int r() {
      return 0;
   }

   public int t() {
      return 0;
   }

   public int s() {
      return this.c() - 1;
   }

   public int u() {
      return this.d() - 1;
   }
}
